import request from "@/utils/request"

export function fetchList(query) {
  return request({
    url: "/basic/hisDic/page",
    method: "get",
    params: query
  })
}

export function GetLazyNodeDicType(id) {
  return request({
    url: "/basic/hisDic/lazyNodeTree/" + id,
    method: "get"
  })
}

export function fetchDicTypeTree(query) {
  return request({
    url: "/basic/hisDic/tree",
    method: "get",
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: "/basic/hisDic",
    method: "post",
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: "/basic/hisDic/" + id,
    method: "get"
  })
}

export function delObj(id) {
  return request({
    url: "/basic/hisDic/" + id,
    method: "delete"
  })
}

export function putObj(obj) {
  return request({
    url: "/basic/hisDic",
    method: "put",
    data: obj
  })
}

export function getBasicDic() {
  return request({
    url: "/basic/hisDic/getBasicDic",
    method: "get"
  })
}

export function getBasicDicTypeById(typeDicId) {
  return request({
    url: "/basic/hisDic/getBasicDicTypeById/" + typeDicId,
    method: "get"
  })
}

export function getBasic() {
  return request({
    url: "/basic/hisDic/getBasic",
    method: "get"
  })
}

export function getBasicTypeById(typeDicId) {
  return request({
    url: "/basic/hisDic/getBasicTypeById/" + typeDicId,
    method: "get"
  })
}

export function getPackageDicTypeById(typeDicId) {
  return request({
    url: "/basic/hisDic/getPackageDicTypeById/" + typeDicId,
    method: "get"
  })
}

export function getPackageTypeById(typeDicId) {
  return request({
    url: "/basic/hisDic/getPackageTypeById/" + typeDicId,
    method: "get"
  })
}
